import { defineConfig, loadEnv } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
// import uniReadPagesV3Plugin from './src/router/utils/uni-read-pages-v3';
// import mpliveMainfestPlugin from './src/libs/mplive-manifest-plugin';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
  const env = loadEnv(mode, __dirname, 'SHOPRO_');
  return {
    plugins: [
      uni(),
      // uniReadPagesV3Plugin({
      //   pagesJsonDir: './src',
      //   includes: ['path', 'aliasPath', 'name', 'meta']
      // }),
      // mpliveMainfestPlugin(env.SHOPRO_MPLIVE_ON)
    ],
    envPrefix: 'SHOPRO_',
    resolve: {
      alias: {
        '@': '/src',
      },
    },
    transpileDependencies:['@dcloudio/uni-ui']
  }
})
